﻿@using com.hyrentals.webcommon.extensions
@using com.hyrentals.webportal.Config
@using com.hyrentals.data
@using com.hyrentals.webportal.Models
@using com.hyrentals.webportal.helpers
@using com.hyrentals.common


@model IEnumerable<RentalRequest>
@{
    Html.AddStyle("css/member");
    MemberNavType navType = MemberNavType.MyTrips;
}

<div class="layout-primary">
    <div class="layout-2-left">
    @Html.Action("Nav", "Member", new { navType = navType})
    </div>
    <div class="layout-2-right">
    @{
        if (Model.Count() > 0)
        {
        <ul class="rr-list">
        @{
            foreach (RentalRequest rr in Model)
            {
            <li>
                <a href="javascript:void(0)" class="photo"><img src="@ImageHelper.GenerateRVSmallCoverPhotoUrl(rr.RelatedRV.CoverPhotoId)" width="@ImageConfig.IMAGE_WIDTH_RV_COVER_SMALL" height="@ImageConfig.IMAGE_HEIGHT_RV_COVER_SMALL"/></a>
                <div class="right">
                    <p class="title"><a href="javascript:void(0)">@rr.RelatedRV.DisplayName</a></p>
                    <p>
                        <span>@FormatHelper.FormatAsDateRange(rr.CheckInTime, rr.CheckOutTime)</span>
                        <a href="javascript:void(0)"><img src="@ImageHelper.GenerateUserSmallAvatar(rr.Renter)" width="@ImageConfig.IMAGE_WIDTH_USER_AVATAR_SMALL" height="@ImageConfig.IMAGE_HEIGHT_USER_AVATAR_SMALL"/></a>
                        <a href="javascript:void(0)">@rr.Renter.Name</a>
                        <span>@rr.State.ToString()</span>
                        <a href="javascript:void(0)">Details</a>
                    </p>
                </div>
            </li>
            }
        }
        </ul>
        }
    }
    </div>
</div>